<template>
  <van-tabbar v-model="active" route v-if="!store.state.common.isLoginPage">
    <van-tabbar-item icon="home-o" :to="route1" @click.native="routerClick">标签</van-tabbar-item>
    <van-tabbar-item icon="search" :to="route2" @click.native="routerClick">标签</van-tabbar-item>
    <van-tabbar-item icon="friends-o" :to="route3" @click.native="routerClick">标签</van-tabbar-item>
    <van-tabbar-item icon="setting-o"></van-tabbar-item>
  </van-tabbar>
</template>

<script>
import {onMounted, ref, reactive, watch, hydrate, computed} from 'vue';
import store from "@/store";

export default {
  name: 'tabNav',
  props: {},

  setup: function (props) {
    let active = ref('');
    let routerClick = () => {
      store.commit('common/GET_IS_PAGE_BACK',false);
    };

    let route1 = {name: 'login'}
    let route2 = {name: 'home'}
    let route3 = {name: 'userCenter'}
    return {
      active,
      routerClick,
      store,
      route1,
      route2,
      route3,
    }
  },

}
</script>

<style scoped>

</style>